import { http } from '@/utils/http';
import type { Talk } from './index.d';

export { Talk };

/** 创建对话 */
export const createTalk = () => {
	return http<any>({
		url: `/api/ai/create`,
		method: 'POST'
	});
};

/** 对话 */
export const getTalkItem = (data: Talk.TalkParams) => {
	return http<any>({
		url: `/api/ai/talk`,
		method: 'POST',
		data,
	});
};

export const getTalkItemAudio = (data: Talk.audioItem) => {
	return http<any>({
		url: `/api/ai/file_upload`,
		method: 'POST',
		data,
	});
};

